<?php

namespace App\Validation;

use Phalcon\Validation\Validator\PresenceOf;
use Phalcon\Validation\Validator\StringLength;

class AdminLoginValidation extends BaseValidation
{
	public function initialize()
	{
		$this->add(
            "account",
            new PresenceOf(
                [
                    "message" => "The account is required",
                ]
            )
        );
		
		$this->add(
			"account",
			new StringLength(
				  [
					  "messageMinimum" => "The account Go beyond",
					  "min" => 2,
				  ]
			)
		);
		
        $this->add(
            "pwd",
            new PresenceOf(
                [
                    "message" => "The pwd is required",
                ]
            )
        );
				
		$this->add(
			"pwd",
			new StringLength(
				  [
					  "messageMinimum" => "The pwd Go beyond",
					  "min" => 6,
				  ]
			)
		);
	}
}